package com.cloud.school.bus.teacherhelper.protocol.classmanage;

import org.apache.http.Header;
import org.json.JSONObject;

import com.cloud.school.bus.teacherhelper.entitys.Student;
import com.cloud.school.bus.teacherhelper.protocol.baseresponse.BaseJsonHttpResponse;

public class InClassResponse extends BaseJsonHttpResponse {

	protected Student student = new Student();
	
	@Override
	public void onSuccess(int statusCode, Header[] headers,
			String responseString) throws Throwable {
		if("1".equals(code)){
			JSONObject mainJsonObject = new JSONObject(responseString);
			student.parentid = mainJsonObject.optString("parentid","");
			student.username = mainJsonObject.optString("username","");
			student.mobile = mainJsonObject.optString("mobile","");
			student.studentid = mainJsonObject.optString("studentid","");
			student.birthday = mainJsonObject.optString("birthday","");
			student.studentno = mainJsonObject.optString("studentno","");
			student.uid_student = mainJsonObject.optString("uid_student","");
			student.cnname = mainJsonObject.optString("cnname","");
			student.enname = mainJsonObject.optString("enname","");
			student.avatar = mainJsonObject.optString("avatar","");
			student.filesize = mainJsonObject.optString("filesize","");
			student.sex = mainJsonObject.optString("sex","");
			student.orderendtime = mainJsonObject.optString("orderendtime","");
			student.age = mainJsonObject.optString("age","");
			
		}
	}

}
